package com.kgc.novel.controller;

import com.kgc.novel.common.Res;
import com.kgc.novel.domain.param.BookTagParam;
import com.kgc.novel.service.book.BookTagService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/book/tag")
@Slf4j
@Api(tags = "标签接口")
public class BookTagController {

    @Resource
    private BookTagService bookTagService;

    @ApiOperation("模糊查询所有标签有分页")
    @GetMapping("/list")
    public Res selectList(@RequestBody BookTagParam bookTagParam){
        return bookTagService.selectBookTagAll(bookTagParam);
    }

    @ApiOperation("查询所有标签无分页")
    @GetMapping("/listAll")
    public Res selectList(){
        return bookTagService.selectBookTagAll();
    }

}
